<?php
/**
 * Created by PhpStorm.
 * User: HLG
 * Date: 2018/12/10
 * Time: 9:31
 */
namespace app\shop\controller;
use think\Controller;
use think\Request;
use think\Session;
use app\shop\model\AdminModel;
class BaseController extends Controller
{
    public function __construct()
    {
        parent::__construct();
        $this->checkLogin();
    }

    public function checkLogin()
    {
        $admin_id = session('adminid');
        if(empty($admin_id)){
            return $this->error('请先登录','login/doLogin');
        }
    }
}